package cn.bb.bbstudy.service.impl;

import cn.bb.bbstudy.dao.BlogCategoryDAO;
import cn.bb.bbstudy.pojo.BlogCategory;
import cn.bb.bbstudy.service.BlogCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BlogCategoryServiceImpl implements BlogCategoryService{

    @Resource
    private BlogCategoryDAO blogCategoryDAO;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return blogCategoryDAO.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(BlogCategory record) {
        return blogCategoryDAO.insert(record);
    }

    @Override
    public int insertSelective(BlogCategory record) {
        return blogCategoryDAO.insertSelective(record);
    }

    @Override
    public BlogCategory selectByPrimaryKey(Integer id) {
        return blogCategoryDAO.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(BlogCategory record) {
        return blogCategoryDAO.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(BlogCategory record) {
        return blogCategoryDAO.updateByPrimaryKey(record);
    }

    public List<BlogCategory> selectAll() {
        return blogCategoryDAO.selectAll();
    }
}
